-- card: 3017 from stack: in -- bmap block id: 0 -- flags: 4000 -- background id: 2630 -- name: Disassembler -- part 7 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=58 top=211 right=343 bottom=209 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part contents for background part 3 ----- text ----- 48C0 48C0 48C0 48C0 48C0 48C0 48C0 48C0 -- part contents for background part 1 ----- text ----- Example Disassembly from Mac Plus Trap Dispatcher Code (from vector at $0028) This is the code that is called whenever a toolbox or operating system trap is executed it determines the address of the trap and transfers control to it. Note that this was performed with a beta version of DASM and so the disassembly here may differ slightly in appearance from other disassemblies you produce. Note too that all values are Hexadecimal. 401F52 SUBQ.L #0002,A7 ;We enter with A7 pointing to PC 401F54 MOVEM.L D1/D2/A2,-(A7) ;We've effectively pushed 14 bytes 401F58 MOVE.L 10(A7),A2 ;A2 points to the trap word 401F5C MOVE.W (A2)+,D2 ;Now D2 holds the trap word. 401F5E MOVE.L A2,10(A7) ;The stack now holds the address after the ;trapword -- We'll return there. 401F62 MOVE.W D2,D1 ;Now D1 and D2 both hold the trapword. 401F64 ANDI.W #1FF,D2 ;Adjust D2 to hold the trapnumber. 401F68 CMPI.W #A800,D1 ;Is trapword smaller than A800? 401F6C BCS $401F88 ;if so, then go to $401F88 401F6E LEA $C00,A2 ;Now A2 points to the OS trap dispatch table. 401F72 LSL.W #2,D2 ;Double the trapnumber, and 401F74 MOVE.L 0(A2,D2.W),C(A7) ;use it as an offset into the dispatch table. ;We put the address of the trap right above ;the registers D1,D2,and A2 that we pushed ;at the start. 401F7A CMPI.W #AC00,D1 ;Is the trapword smaller than AC00? 401F7E MOVEM.L (A7)+, D1/D2/A2 ;Restore registers D1,D2, and A2. 401F82 BCS $401F86 ;If trapword is smaller than AC00 then go 401F84 POP.L (A7) ;Otherwise pop the trapaddress 401F86 RTS ;Jump to the trap's address with the return ;Address on the stack. We come here if the trapword in D1 is smaller than A800. 401F88 LEA $400,A2 401F8C BCLR #8,D2 401F90 BNE $401FAC 401F92 LSL.W #2,D2 401F94 MOVE.L 0(A2,D2.W),A2 401F98 MOVEM.L A0/A1,-(A7) 401F9C JSR (A2) 401F9E MOVEM.L (A7)+, A0/A1 401FA2 MOVEM.L (A7)+, D1/D2/A2 401FA6 ADDQ.W #0004,A7 401FA8 TST.W D0 401FAA RTS 401FAC LSL.W #2,D2 401FAE MOVE.L 0(A2,D2.W),A2 401FB2 PUSH.L A1 401FB4 JSR (A2) 401FB6 POP.L A1 401FB8 BRA $401FA2 401FBA BTST #9,D1 401FBE BEQ $401FE0 401FC0 ANDI.W #1FF,D0 401FC4 LEA $C00,A1 401FC8 BTST #A,D1 401FCC BNE $401FD6 401FCE ANDI.W #FF,D0 401FD2 LEA $400,A1 401FD6 LSL.W #2,D0 401FD8 MOVE.L A0,0(A1,D0.W) 401FDC MOVEQ #0,D0 401FDE RTS 401FE0 BSR $401FE4 401FE2 BRA $401FD6 401FE4 ANDI.W #1FF,D0 401FE8 LEA $C00,A1 401FEC CMPI.W #57,D0 401FF0 BHI $402004 401FF2 BEQ $402000 401FF4 CMPI.W #4F,D0 401FF8 BLS $402000 401FFA CMPI.W #54,D0 401FFE BNE $402004 402000 LEA $400,A1 402004 RTS 402006 BSR $401FE4 402008 BRA $402026 40200A BTST #9,D1 40200E BEQ $402006 402010 ANDI.W #1FF,D0 402014 LEA $C00,A1 402018 BTST #A,D1 40201C BNE $402026 40201E ANDI.W #FF,D0 402022 LEA $400,A1 402026 LSL.W #2,D0 402028 MOVE.L 0(A1,D0.W),A0 40202C MOVEQ #0,D0 40202E RTS